// Copyright (c) 2024, json_wang and contributors
// For license information, please see license.txt

// frappe.ui.form.on("AC_CashFlow", {
// 	refresh(frm) {

// 	},
// });
frappe.ui.form.on("AC_CashFlow", {
    refresh(frm) {
        frm.add_custom_button('获取数据', () => {
            frm.call('get_data', { throw_if_missing: true })
                .then(r => {
                    frappe.msgprint("获取数据成功!");
                })
        }); 
        frm.add_custom_button('生成报表', () => {
            frm.call('build_report', { throw_if_missing: true })
                .then(r => {
                    frappe.msgprint("生成成功!");
                })
        });        
    },
});